<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/proj4@2.7.5/dist/proj4.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/ol@7.3.0/dist/ol.js"></script>
</head>
<body>
  <div id="map" style="width: 100vw; height: 100vh;"></div>
  <script>
    // 定义投影
    proj4.defs(
      "EPSG:32650",
      "+proj=utm +zone=50 +datum=WGS84 +units=m +no_defs"
    );

    // 注册到 OpenLayers
    ol.proj.proj4.register(proj4);

    // 创建地图
    const map = new ol.Map({
      target: 'map',
      view: new ol.View({
        projection: 'EPSG:32650',
        center: [500000, 0],
        zoom: 5,
      }),
      layers: [
        new ol.layer.Tile({
          source: new ol.source.XYZ ({
			url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
            projection: 'EPSG:32650',
          }),
        }),
      ],
    });
  </script>
</body>
</html>